from .main import celery_app
from common.utils import send_message
from common.utils import send_email


@celery_app.task
def sms_code(mobile: str, captcha: str, minute: int):
    """异步发送短信 任务"""
    send_message(mobile, captcha, minute)


@celery_app.task
def async_send_email(to: str, href: str):
    """ 异步 发送邮件"""
    send_email(to, href)